package com.istroev.client;

import javax.xml.ws.BindingProvider;

import com.istroev.server.Server;
import com.istroev.server.ServerService;



public class Client {
	public static void main(String[] args) {
		Server proxy = new ServerService().getServerPort();
		((BindingProvider)proxy).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
		// Create a new Item object with a part number of '123456' and an item 
		// count of 4.
		int item = 5;
		// After first call, we'll print '1' (the return value is the number of objects 
		// in the Cart object)
		System.out.println(proxy.addToCart(item));
		// After the second call, we'll print '2', since we've added another 
		// Item to the stateful, saved Cart object.
		System.out.println(proxy.addToCart(item));
	}
}